package com.dms.modules.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "商品评价DTO", description = "商品评价数据传输对象")
public class ProductCommentDTO {

    @ApiModelProperty("商品ID")
    @NotNull(message = "商品ID不能为空")
    private Long productId;

    @ApiModelProperty("评价内容")
    @NotBlank(message = "评价内容不能为空")
    private String content;

    @ApiModelProperty("评分(1-5)")
    @NotNull(message = "评分不能为空")
    @Min(value = 1, message = "评分不能小于1")
    @Max(value = 5, message = "评分不能大于5")
    private Integer rating;

    @ApiModelProperty("评价图片，多个图片用逗号分隔")
    private String images;
} 